import api from './api';

// 八字分析
export const baziAnalysis = async (data: {
  year: number;
  month: number;
  day: number;
  hour?: number;
  gender: number;
  name?: string;
}) => {
  return api.post('/bazi/analysis', data);
};

// 获取八字详细分析（付费内容）
export const getBaziDetail = async (baziId: string) => {
  return api.get(`/bazi/analysis/${baziId}/detail`);
};

// 获取用户的八字记录列表
export const getUserBaziRecords = async (params: {
  page?: number;
  per_page?: number;
}) => {
  return api.get('/bazi/records', { params });
};
